<template>
    <div>
        <Swiper :swiperList='swiperList' class="Swiper"></Swiper>
            <Content 
                :MainList='MainList' 
                :brandList='brandList' 
                class="Content"
            ></Content>
            <HomePanel :HomeNew='HomeNew'></HomePanel>
            <HomeHot :HomeHot='HomeHot'></HomeHot>
            <HomeBrand :HomeBrand='HomeBrand'></HomeBrand>
            <HomeGoods :title='title'></HomeGoods>
            <HomeSpecial :specialList='specialList'></HomeSpecial>  
    </div>
</template>

<script>
    import Swiper from '@/pages/index/swiper/swiper.vue'
    import Content from '@/pages/index/content.vue'
    import HomePanel from '@/pages/index/home/homeNew.vue'
    import HomeHot from '@/pages/index/home/homeHot.vue'
    import HomeBrand from '@/pages/index/home/homeBrand.vue'
    import HomeGoods from '@/pages/index/home/homeGoods.vue'
    import HomeSpecial from '@/pages/index/home/homeSpecial.vue'
    import CateGory from '@/pages/communal/category.vue'

export default {
    name: 'VueProject01Homeview',
    components:{
        Swiper,
        Content,
        HomePanel,
        HomeHot,
        HomeBrand,
        HomeGoods,
        HomeSpecial,
        // Swipers,
        CateGory,
    },
    data() {
        return {
            swiperList:[],
            MainList:[],
            brandList:[],//品牌
            HomeNew:[],
            HomeHot:[],
            HomeBrand:[],
            title:[],
            specialList:[]
        };
    },

    mounted() {
        console.log('homeView');
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/banner').then((res)=>{
            if(res.data){
                this.swiperList=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/category/head').then((res)=>{
            if(res.data){
                this.MainList=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/brand?limit=6').then((res)=>{
            if(res.data){
                this.brandList=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/new').then((res)=>{
            if(res.data){
                this.HomeNew=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/hot').then((res)=>{
            if(res.data){
                this.HomeHot=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/brand?limit=10').then((res)=>{
            if(res.data){
                this.HomeBrand=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/goods').then((res)=>{
            if(res.data){
                this.title=res.data.result
            }
        })
        this.axios.get('https://apipc-xiaotuxian-front.itheima.net/home/special').then((res)=>{
            if(res.data){
                this.specialList=res.data.result
            }
        })
    },

    methods: {
        
    },
};
</script>

<style scoped>
.Swiper{
        position: relative;
    }
.Content{
    position: absolute;
    top: 185px;
    background: rgba(rgb(255, 255, 255), .8) ;
}
</style>